#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <string.h>

int main()
{
	int i;
	char str[1002] = { 0 }, str2[1002] = { 0 };
	scanf("%s", str);
	scanf("%s", str2);

	for (i = 0; i < strlen(str); i++)
	{
		if (str[i] < 90 && str[i] >= 65)
			str[i] += 33;
		else if (str[i] == 'Z')
			str[i] = 'a';
		else if (str[i] < 122 && str[i] >= 97)
			str[i] -= 31;
		else if (str[i] == 'z')
			str[i] = 'A';
		else if (str[i] < 57 && str[i] >= 48)
			str[i] += 1;
		else if (str[i] == '9')
			str[i] = '0';
	}
	for (i = 0; i < strlen(str2); i++)
	{
		if (str2[i] <= 90 && str2[i] > 65)
			str2[i] += 31;
		else if (str2[i] == 'A')
			str2[i] = 'z';
		else if (str2[i] <= 122 && str2[i] > 97)
			str2[i] -= 33;
		else if (str2[i] == 'a')
			str2[i] = 'Z';
		else if (str2[i] <= 57 && str2[i] > 48)
			str2[i] -= 1;
		else if (str2[i] == '0')
			str2[i] = '9';
	}
	printf("%s\n", str);
	printf("%s\n", str2);
}